<textarea id="{$_rs.identifier}" name="{$_rs.identifier}" style="{$_rs.form_style}">{$_rs.content}</textarea>
<script type="text/javascript">
$(document).ready(function(){
	CKEDITOR.replace( '{$_rs.identifier}', {  
		language:'{$_rs.config.langid}',
		height : '{$_rs.height}px',
		readOnly:{$_rs.is_read ? 'true' : 'false'},
		startupMode:'{$_rs.is_code ? "source" : "wysiwyg"}',
		toolbar: [
			{ name: 'basicstyles', items: [ 'Bold', 'Italic', 'Underline', 'Strike','kbd','-', 'Subscript', 'Superscript', '-', 'RemoveFormat','quickformat' ] },
			{ name: 'colors', items: [ 'TextColor', 'BGColor' ] },
			{ name: 'paragraph', items: [ 'NumberedList', 'BulletedList', '-', 'Outdent', 'Indent', 'Blockquote', '-', 'JustifyLeft', 'JustifyCenter', 'JustifyRight', 'JustifyBlock' ] },
			{ name: 'links', items: [ 'Link', 'Unlink' ] },
			{ name: 'insert', items: [
				{if $_rs.btns.image && $session.user_id}'images',{/if}
				{if $_rs.btns.video && $session.user_id}'Html5video',{/if}
				{if $_rs.btns.audio && $session.user_id}'Html5audio',{/if}
				{if $_rs.btns.file && $session.user_id}'filelist',{/if}
				{if $_rs.btns.table}'Table',{/if}
				{if $_rs.btns.emotion}'Smiley',{/if}
				{if $_rs.btns.spechars}'SpecialChar',{/if}
				{if $_rs.btns.insertcode}'Syntaxhighlight',{/if}
				'HorizontalRule'
			] }
			{if $_rs.btns.fontfamily || $_rs.btns.fontsize}
			,{ name: 'styles', items: [{if $_rs.btns.fontfamily}'Font',{/if} {if $_rs.btns.fontsize}'FontSize',{/if} ] }
			{/if}
		],
		removePlugins:'easyimage,cloudservices,exportpdf,autogrow,fixed{if $_removePlugins},{$_removePlugins}{/if}',
		filebrowserImageBrowseUrl:'{url ctrl=ckeditor func=images /}',
		filebrowserUpload:'{url ctrl=ckeditor func=upload /}',
		filebrowserHtml5videoBrowseUrl: '{url ctrl=ckeditor func=videolist /}',
		filebrowserHtml5audioBrowseUrl: '{url ctrl=ckeditor func=audiolist /}',
		filebrowserImageBrowseUrlSingle:'{url ctrl=ckeditor func=image /}',
		filebrowserFilelist:'{url ctrl=ckeditor func=filelist /}',
		imgToLocalUpload:'{url ctrl=ckeditor func=remote /}'
	});
	CKEDITOR.instances['{$_rs.identifier}'].on('change',function() {
		CKEDITOR.instances['{$_rs.identifier}'].updateElement();
	});
});
</script>
<!-- if $_rs.js_www -->
<script type="text/javascript">
$(document).ready(function(){
	{$_rs.js_www}
});
</script>
<!-- /if -->